<template>
	<view>
		<image class="bgImage" src="/static/image/guide/homeBg.png" mode="widthFix"></image>
		<view class="navBox">
			<image class="backBtn" @click="goBack" src="http://cdn.yic3.cn/lawyer/mp-xhs/mine/backIcon.png"
				mode="widthFix"></image>
			<p>{{fileObj.fileName}}</p>
		</view>
		<view style="width: 100%;height: 188rpx;"></view>
		<scroll-view scroll-y="true" class="listBox">
			<text id="pdf-container">{{content}}</text>
		</scroll-view>
		<view class="btnBox">
			<p class="copy" @click="copyText(content)">复制</p>
			<!-- #ifdef MP -->
			<p v-if="show">下载APP享更好体验</p>
			<!-- #endif -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: "",
				content: '',
				fileObj: {},
				show:false
			};
		},
		onLoad(e) {
			this.show = uni.getStorageSync('config')['client.pay.enable']
			this.fileObj = e
			this.getReviewDetail()
		},
		methods: {
			getReviewDetail() {
				this.$api.getReviewDetail({
					reviewId: this.fileObj.id
				}).then(res => {
					console.log(res.data)
					if (res.data.code == 0) {
						console.log(res.data.data.resultContent)
						this.content = res.data.data.resultContent
					}
				})
			}
		},
	}
</script>

<style lang="scss">
	page {
		background-color: #15161C;
	}

	.bgImage {
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		width: 100%;
		display: block;
		height: 340rpx;
	}

	.navBox {
		width: 100%;
		position: fixed;
		top: 100rpx;
		color: #FFFFFF;
		font-weight: bold;
		font-size: 36rpx;
		text-align: center;
		height: 88rpx;
		line-height: 88rpx;

		.backBtn {
			position: absolute;
			left: 30rpx;
			bottom: 20rpx;
			margin: auto 0;
			width: 40rpx;
			height: 40rpx;
			line-height: 40rpx;
		}

		>p {
			width: 60%;
			margin: 0 auto;
			white-space: nowrap;
			overflow-x: hidden;
			text-overflow: ellipsis;
		}
	}

	.listBox {
		width: 720rpx;
		margin: 0 auto;
		height: calc(100vh - 350rpx);
		color: #fff;
		font-size: 28rpx;
	}

	.btnBox {
		width: 690rpx;
		position: fixed;
		bottom: 50rpx;
		left: 0;
		right: 0;
		margin: 0 auto;
		display: flex;
		align-items: center;
		justify-content: space-between;
		>p{
			width: 320rpx;
			line-height: 100rpx;
			background: linear-gradient(101deg, rgba(78, 188, 123, 1) 0%, rgba(71, 233, 105, 1) 100%);
			box-shadow: 0rpx 8rpx 24rpx 0rpx rgba(75,211,114,0.3);
			border-radius: 100rpx 100rpx 100rpx 100rpx;
			text-align: center;
			font-weight: bold;
			color: #fff;
			font-size: 28rpx;
		}
		.copy {
			font-size: 32rpx;
			background: linear-gradient( 101deg, #AB4AB1 0%, #1F89D4 100%);
			box-shadow: 0rpx 8rpx 24rpx 0rpx rgba(92, 110, 198, 0.52);
		}
	}
</style>